Developer Documentation

QuickTime 4 API Documentation

3D Graphics Programming with QuickDraw 3D 1.5.4

Previous | QD3D Book | Overview | Chapter Contents | Next |

Creating and Editing Disks

QuickDraw 3D provides routines that you can use to create and manipulate disks. See "Disks" for the definition of a disk.

Q3Disk_New

You can use the Q3Disk_New function to create a new disk.

TQ3GeometryObject Q3Disk_New (const TQ3DiskData *diskData);
diskData
A pointer to a TQ3DiskData structure.

DESCRIPTION

The Q3Disk_New function returns, as its function result, a new disk having the shape and attributes specified by the diskData parameter. If a new disk could not be created, Q3Disk_New returns the value NULL .

Q3Disk_Submit

You can use the Q3Disk_Submit function to submit an immediate disk for drawing, picking, bounding, or writing.

TQ3Status Q3Disk_Submit (
                     const TQ3DiskData *diskData,
                     TQ3ViewObject view);
diskData
A pointer to a TQ3DiskData structure.
view
A view.

DESCRIPTION

The Q3Disk_Submit function submits for drawing, picking, bounding, or writing the immediate disk whose shape and attribute set are specified by the diskData parameter. The disk is drawn, picked, bounded, or written according to the view characteristics specified in the view parameter.

SPECIAL CONSIDERATIONS

You should call this function only in a submitting loop.

Q3Disk_GetData

You can use the Q3Disk_GetData function to get the data that defines a disk and its attributes.

TQ3Status Q3Disk_GetData (
                     TQ3GeometryObject disk,
                     TQ3DiskData *diskData);
disk
A disk.
diskData
On exit, a pointer to a TQ3DiskData structure that contains information about the disk specified by the disk parameter.

DESCRIPTION

The Q3Disk_GetData function returns, through the diskData parameter, information about the disk specified by the disk parameter. QuickDraw 3D allocates memory for the TQ3DiskData structure internally; you must call Q3Disk_EmptyData to dispose of that memory.

Q3Disk_SetData

You can use the Q3Disk_SetData function to set the data that defines a disk and its attributes.

TQ3Status Q3Disk_SetData (
                     TQ3GeometryObject disk,
                     const TQ3DiskData *diskData);
disk
A disk.
diskData
A pointer to a TQ3DiskData structure.

DESCRIPTION

The Q3Disk_SetData function sets the data associated with the disk specified by the disk parameter to the data specified by the diskData parameter.

Q3Disk_EmptyData

You can use the Q3Disk_EmptyData function to release the memory occupied by the data structure returned by a previous call to Q3Disk_GetData .

TQ3Status Q3Disk_EmptyData (TQ3DiskData *diskData);
diskData
A pointer to a TQ3DiskData structure.

DESCRIPTION

The Q3Disk_EmptyData function releases the memory occupied by the TQ3DiskData structure pointed to by the diskData parameter; that memory was allocated by a previous call to Q3Disk_GetData .

Q3Disk_GetOrigin

You can use the Q3Disk_GetOrigin function to get the origin of a disk.

TQ3Status Q3Disk_GetOrigin (
                     TQ3GeometryObject disk,
                     TQ3Point3D *origin);
disk
A disk.
origin
On exit, the origin of the specified disk.

DESCRIPTION

The Q3Disk_GetOrigin function returns, in the origin parameter, the origin of the disk specified by the disk parameter.

Q3Disk_SetOrigin

You can use the Q3Disk_SetOrigin function to set the origin of a disk.

TQ3Status Q3Disk_SetOrigin (
                     TQ3GeometryObject disk,
                     const TQ3Point3D *origin);
disk
A disk.
origin
The desired origin of the specified disk.

DESCRIPTION

The Q3Disk_SetOrigin function sets the origin of the disk specified by the disk parameter to that specified in the origin parameter.

Q3Disk_GetMajorRadius

You can use the Q3Disk_GetMajorRadius function to get the major radius of a disk.

TQ3Status Q3Disk_GetMajorRadius (
                     TQ3GeometryObject disk,
                     TQ3Vector3D *majorRadius);
disk
A disk.
majorRadius
On exit, the major radius of the specified disk.

DESCRIPTION

The Q3Disk_GetMajorRadius function returns, in the majorRadius parameter, the major radius of the disk specified by the disk parameter.

Q3Disk_SetMajorRadius

You can use the Q3Disk_SetMajorRadius function to set the major radius of a disk.

TQ3Status Q3Disk_SetMajorRadius (
                     TQ3GeometryObject disk,
                     const TQ3Vector3D *majorRadius);
disk
A disk.
majorRadius
The desired major radius of the specified disk.

DESCRIPTION

The Q3Disk_SetMajorRadius function sets the major radius of the disk specified by the disk parameter to that specified in the majorRadius parameter.

Q3Disk_GetMinorRadius

You can use the Q3Disk_GetMinorRadius function to get the minor radius of a disk.

TQ3Status Q3Disk_GetMinorRadius (
                     TQ3GeometryObject disk,
                     TQ3Vector3D *minorRadius);
disk
A disk.
minorRadius
On exit, the minor radius of the specified disk.

DESCRIPTION

The Q3Disk_GetMinorRadius function returns, in the minorRadius parameter, the minor radius of the disk specified by the disk parameter.

Q3Disk_SetMinorRadius

You can use the Q3Disk_SetMinorRadius function to set the minor radius of a disk.

TQ3Status Q3Disk_SetMinorRadius (
                     TQ3GeometryObject disk,
                     const TQ3Vector3D *minorRadius);
disk
A disk.
minorRadius
The desired minor radius of the specified disk.

DESCRIPTION

The Q3Disk_SetMinorRadius function sets the minor radius of the disk specified by the disk parameter to that specified in the minorRadius parameter.


© 1997 Apple Computer, Inc.

Previous | QD3D Book | Overview | Chapter Contents | Next |